package com.ycl.plus.lm.hardware.domain.vo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ycl.plus.lm.hardware.domain.HardwareEquip;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ycl.plus.lm.common.excel.annotation.ExcelDictFormat;
import com.ycl.plus.lm.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;


/**
 * 设备视图对象 hardware_equip
 *
 * @author devil-ycl
 * @date 2024-11-07
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = HardwareEquip.class)
public class HardwareEquipVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Long id;

    /**
     * 设备名
     */
    @ExcelProperty(value = "设备名")
    private String name;

    /**
     * 所属用户id
     */
    private Long userId;

    /**
     * 所属用户
     */
    @ExcelProperty(value = "所属用户")
    private String userName;

    /**
     * 设备别名
     */
    @ExcelProperty(value = "设备别名")
    private String alias;

    /**
     * 激活状态
     */
    @ExcelProperty(value = "激活状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "hardware_equip_active")
    private Integer active;

    /**
     * 激活时间
     */
    @ExcelProperty(value = "激活时间")
    private Date activeTime;

    /**
     * 制造商
     */
    @ExcelProperty(value = "制造商")
    private String manufacturer;

    /**
     * 型号
     */
    @ExcelProperty(value = "型号")
    private String model;

    /**
     * 硬件版本
     */
    @ExcelProperty(value = "硬件版本")
    private String firmwareVersion;

    /**
     * 软件版本
     */
    @ExcelProperty(value = "软件版本")
    private String softwareVersion;

    /**
     * 位置
     */
    @ExcelProperty(value = "位置")
    private String location;

    /**
     * 运行状态
     */
    @ExcelProperty(value = "运行状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "hardware_equip_run_status")
    private Integer runStatus;

    /**
     * 运行时间
     */
    @ExcelProperty(value = "运行时间")
    private Date startTime;

    /**
     * 停止时间
     */
    @ExcelProperty(value = "停止时间")
    private Date endTime;

    /**
     * 上次运行
     */
    @ExcelProperty(value = "上次运行")
    private Date lastStartTime;

    /**
     * 上次停止
     */
    @ExcelProperty(value = "上次停止")
    private Date lastEndTime;

    /**
     * 传感器id
     */
    private List<Long> sensorIds;
}
